﻿using System;
using System.Collections.Generic;
using System.Text;
using GD.ModelContest.DataAccess;
using GD.ModelContest.Model;

namespace GD.ModelContest.Service.Impl
{
    public class AdminServiceImpl : IAdminService
    {
        private IAdminDao infoDao;

        public AdminServiceImpl(IAdminDao infoDao)
        {
            this.infoDao = infoDao;
        }

        #region mc_admin 对象

        public bool InsertAdmin(mc_admin admin)
        {
            return infoDao.InsertAdmin(admin);
        }

        public bool UpdateAdmin(mc_admin admin)
        {
            return infoDao.UpdateAdmin(admin);
        }

        public bool DeleteAdmin(int adminId)
        {
            return infoDao.DeleteAdmin(adminId);
        }

        public mc_admin GetAdminByLogin(string adminName, string password)
        {
            return infoDao.GetAdminByLogin(adminName, password);
        }

        #endregion
    }
}
